﻿using DBLibrary.DataBase;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Security.Claims;
using System.Text;
using System.Threading.Tasks;

namespace DBLibrary.Model.pojo
{
    [Serializable]
    public class SwitchData : BaseClone<SwitchData>  //开关数据表
    {
        public event PropertyChangedEventHandler PropertyChanged = delegate { };
        private int _SensorId;                      //[系统序号]
        private int _status;                        //[状态]
        private DateTime _Time;                     //[时间] (系统时间)
        private DateTime _Time2;                    //[时间2] (数据时间)
        private int _Value;                         //[数值]
        private int _OpenPort;                      //[开出端口号]
        private int _isPowerOff;                    //[断电否]
        private string _PowerOffMsg;                //[断电信息]
        private string _Describe;                   //[备注]
        private int _isUpload;                      //[上传否]
        private int _isUpload2;                     //[上传否2]
        private int _isUpload3;                     //[上传否3]
        private int _isUpload4;                     //[上传否4]

        private string _cribe;                              //描述

        public string Cribe
        {
            get => _cribe;
            set
            {
                _cribe = value;
                if (PropertyChanged != null)
                {
                    PropertyChanged.Invoke(this, new PropertyChangedEventArgs("Cribe"));
                }
            }
        }
        public int SensorId
        {
            get => _SensorId;
            set
            {
                _SensorId = value;
                if (PropertyChanged != null)
                {
                    PropertyChanged.Invoke(this, new PropertyChangedEventArgs("SensorId"));
                }
            }
        }
        public int Status
        {
            get => _status;
            set
            {
                _status = value;
                if (PropertyChanged != null)
                {
                    PropertyChanged.Invoke(this, new PropertyChangedEventArgs("Status"));
                }
            }
        }
        public DateTime Time
        {
            get => _Time;
            set
            {
                _Time = value;
                if (PropertyChanged != null)
                {
                    PropertyChanged.Invoke(this, new PropertyChangedEventArgs("Time"));
                }
            }
        }
        public DateTime Time2
        {
            get => _Time2;
            set
            {
                _Time2 = value;
                if (PropertyChanged != null)
                {
                    PropertyChanged.Invoke(this, new PropertyChangedEventArgs("Time2"));
                }
            }
        }
        public int Value
        {
            get => _Value;
            set
            {
                _Value = value;
                if (PropertyChanged != null)
                {
                    PropertyChanged.Invoke(this, new PropertyChangedEventArgs("Value"));
                }
            }
        }
        public int OpenPort
        {
            get => _OpenPort;
            set
            {
                _OpenPort = value;
                if (PropertyChanged != null)
                {
                    PropertyChanged.Invoke(this, new PropertyChangedEventArgs("OpenPort"));
                }
            }
        }
        public int IsPowerOff
        {
            get => _isPowerOff;
            set
            {
                _isPowerOff = value;
                if (PropertyChanged != null)
                {
                    PropertyChanged.Invoke(this, new PropertyChangedEventArgs("IsPowerOff"));
                }
            }
        }
        public string PowerOffMsg
        {
            get => _PowerOffMsg;
            set
            {
                _PowerOffMsg = value;
                if (PropertyChanged != null)
                {
                    PropertyChanged.Invoke(this, new PropertyChangedEventArgs("PowerOffMsg"));
                }
            }
        }
        public string Describe {
            get => _Describe;
            set
            {
                _Describe = value;
                if (PropertyChanged != null)
                {
                    PropertyChanged.Invoke(this, new PropertyChangedEventArgs("Describe"));
                }
            }
        }
        public int IsUpload
        {
            get => _isUpload;
            set
            {
                _isUpload = value;
                if (PropertyChanged != null)
                {
                    PropertyChanged.Invoke(this, new PropertyChangedEventArgs("IsUpload"));
                }
            }
        }
        public int IsUpload2
        {
            get => _isUpload2;
            set
            {
                _isUpload2 = value;
                if (PropertyChanged != null)
                {
                    PropertyChanged.Invoke(this, new PropertyChangedEventArgs("IsUpload2"));
                }
            }
        }
        public int IsUpload3
        {
            get => _isUpload3;
            set
            {
                _isUpload3 = value;
                if (PropertyChanged != null)
                {
                    PropertyChanged.Invoke(this, new PropertyChangedEventArgs("IsUpload3"));
                }
            }
        }
        public int IsUpload4
        {
            get => _isUpload4;
            set
            {
                _isUpload4 = value;
                if (PropertyChanged != null)
                {
                    PropertyChanged.Invoke(this, new PropertyChangedEventArgs("IsUpload4"));
                }
            }
        }

    }
}
